# -*- coding: utf-8 -*-
"""
Created on Thu Jun  1 14:20:09 2017

@author: WANGWEIW23
"""
import numpy as np
import scipy.stats
x = [np.random.randint(1, 11) for i in range(10)]
print(x)
print(np.sum(x))
px = x / np.sum(x)
print(px)
y = [np.random.randint(1, 11) for i in range(10)]
print(y)
print(np.sum(y))
py = y / np.sum(y)
print(py)
KL = scipy.stats.entropy(x, y) 
print(KL)

